package yzserver.sx4a.dao.ibatis;

import com.sitech.ibnms.core.BaseIbnmsDao;
import yzserver.sx4a.dao.IPositionDao;
import yzserver.sx4a.dao.IPositionDao;
import yzserver.sx4a.domain.PositionDomain;

import java.util.HashMap;
import java.util.List;

public class PositionDaoImpl extends BaseIbnmsDao implements IPositionDao {


    @Override
    public PositionDomain selPosition(String positionid) {
        HashMap map = new HashMap();
        map.put("positionid",positionid);
        return (PositionDomain)querySingle("shanxi_selPosition",map);
    }

    @Override
    public void addPosition(PositionDomain position) throws Exception {
        insert("shanxi_addPosition",position);
    }

    @Override
    public void updPosition(PositionDomain position) throws Exception {
        update("shanxi_updPosition",position);
    }

    @Override
    public void delPosition(String positionid) throws Exception {
        HashMap map = new HashMap();
        map.put("positionid",positionid);
        delete("shanxi_delPosition",map);
    }

    @Override
    public List<PositionDomain> selAllPosition(String positionid) {
        HashMap map = new HashMap();
        map.put("positionid",positionid);
        return (List<PositionDomain>)query("shanxi_selAllPosition", map);
    }
}
